//
//  ShowRes.m
//  Taste
//
//  Created by 徐昊 on 16/9/6.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "ShowRes.h"
#import "Comments.h"
@implementation ShowRes

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"comments"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Comments *comments = [Comments modelWithDic:dic];
            [array addObject:comments];
        }
        _comments = array;
    }
    if ([key isEqualToString:@"id"]) {
        _show_id = value;
    }
}


+ (NSDictionary *)objectClassInArray{
    return @{@"comments" : [Comments class]};
}

@end
